<%--                                                                       --%>
<%-- Copyright (c) 2001-2004 BroadVision, Inc.  All rights reserved.       --%>
<%--                                                                       --%>
<%-- This software is copyrighted. Under the copyright laws, this software --%>
<%-- may not be copied, in whole or in part, without prior written consent --%>
<%-- of BroadVision, Inc. or its assignees. This software is provided      --%>
<%-- under the terms of a license between BroadVision and the recipient,   --%>
<%-- and its use is subject to the terms of that license.                  --%>
<%--                                                                       --%>
<%-- This software may be protected by one or more U.S. and International  --%>
<%-- patents.  Certain applications of BroadVision One-To-One software are --%>
<%-- covered by U.S. patent 5,710,887.                                     --%>
<%--                                                                       --%>
<%-- TRADEMARKS: BroadVision and BroadVision One-To-One are registered     --%>
<%-- trademarks of BroadVision, Inc., in the United States and the         --%>
<%-- European Community, and are trademarks of BroadVision, Inc., in other --%>
<%-- countries.  The BroadVision logo, is a trademark of BroadVision,      --%>
<%-- Inc., in the United States and other countries. Additionally, IONA    --%>
<%-- and Orbix are trademarks of IONA Technologies, Ltd.  RSA, MD5, and    --%>
<%-- RC2 are trademarks of RSA Data Security, Inc.                         --%>
<%--                                                                       --%>

<%@ page import =  "org.apache.commons.beanutils.PropertyUtils,
                    com.broadvision.web.util.ViewDynaBean,
                    java.util.List"
%>

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

<script language="JavaScript">

  //
  function closeWindow() {
    self.close();
  }
  
  //
  function setComments(theForm) {
    if (validatePackageChangeEditPopupForm(theForm) == false) {
     return;
    }

    if (window != null && window.opener != null) {
      window.opener.setComments(theForm.parentFormName.value, 
        theForm.packageOid.value, theForm.logtime.value, theForm.userId.value, theForm.changeIn.value,
        theForm.comments.value);
      window.close();
    }
  }

</script>

<html:javascript formName="packageChangeEditPopupForm"/>
<html:form action="/bp/packageChangeEditPopup.do"  onsubmit="return validatePackageChangeEditPopupForm(this);">

<html:hidden name="packageChangeEditPopupForm" property="parentFormName"/>
<html:hidden name="packageChangeEditPopupForm" property="parentFieldName"/>
<html:hidden name="packageChangeEditPopupForm" property="packageOid"/>
<html:hidden name="packageChangeEditPopupForm" property="logtime"/>
<html:hidden name="packageChangeEditPopupForm" property="userId"/>
<html:hidden name="packageChangeEditPopupForm" property="changeIn"/>

      <!-- Zone 5 starts here.  -->
      <table class="zoneFive" width="100%" border="0" cellspacing="0" cellpadding="0" summary="content area">
        <tr>
          <td valign="top" width="100%">
            <div class="generalWrapRight">
              <html:button property="closeWinBtn" styleClass="inputButton" onclick="javascript:closeWindow()">
                <bean:message key="button.close"  bundle="bp.messages"/>
              </html:button>
            </div> 
            <div class="pageSubtitle">
              <span class="left"><bean:message key="bp.package.packageChangeCommentsPopup.update" bundle="bp.messages"/></title></span>
              <span class="right">&nbsp;</span>
            </div>
            <table class="labelForm" width="100%" border="0" cellspacing="0" cellpadding="0" summary="Package summary">
              <tr> 
                <td class="label"><bean:message key="bp.package.packageChangeCommentsPopup.changeComments" bundle="bp.messages"/></title></td>
                <td class="labelField">
                  <html:textarea name="packageChangeEditPopupForm" property="comments"/>
                </td>
              </tr>
            </table>
            <div class="pageButtonWrap" align="right">

              <input type="button" name="cancelData" class="pageButton" 
                onclick="javascript:closeWindow()" 
                value='<bean:message key="button.cancel" bundle="bp.messages"/>'>

              <input type="button" name="updateComments" class="pageButton" 
                onclick="setComments(this.form);" 
                value='<bean:message key="button.update" bundle="bp.messages"/>'>
            </div>
          </td>
        </tr>
      </table>
      <!--end zone 5 content here -->
</html:form>
